package lormi.meipin.service.impl;


import org.springframework.stereotype.Service;

import lormi.meipin.entity.InvitationCode;
import lormi.meipin.exception.LMException;
import lormi.meipin.service.BaseService;
import lormi.meipin.service.IInvitationCodeService;

@Service
public class InvitationCodeService extends BaseService implements IInvitationCodeService{

	@Override
	public InvitationCode getInviteCode(Integer userId) throws LMException {
		InvitationCode invitationCode = invitationCodeMapper.selectByUserId(userId);
		if (invitationCode==null) {
			throw new LMException(100035);
		}
		return invitationCode;
	}

	
}
